package com.just.springjpa.service;

import com.just.springjpa.dao.JPQLHandler;
import com.just.springjpa.domain.Student;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.stereotype.Service;

import java.util.Map;
@Service
public class StudentServiceImpl implements StudentService{
    @Autowired
    JPQLHandler jpqlHandler;
    @Override
    public Page<Student> findByJPQL(String hqlString, Map<String, Object> params, Pageable pageable) {
        Page<Student> page=jpqlHandler.query(hqlString,params,pageable,Student.class);
        return page;
    }
}
